//
//  HQHFreeDetailTableViewCell.m
//  LastOne
//
//  Created by 小柠檬 on 15/11/6.
//  Copyright © 2015年 sc. All rights reserved.
//

#import "HQHFreeDetailTableViewCell.h"
#import "FitHeader.h"
#import "NightHeader.h"
@implementation HQHFreeDetailTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(20 * FitWidth, 20 * FitHeight, 300 * FitWidth, 40 * FitHeight)];
        _titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:20];
        [_titleLabel NightWithType:UIViewColorTypeNormal];
        [self.contentView addSubview:_titleLabel];
        
        self.shortcontentLabel = [[UILabel alloc]initWithFrame:CGRectMake(_titleLabel.frame.origin.x, _titleLabel.frame.origin.y + _titleLabel.frame.size.height + 10 * FitHeight, 335 * FitWidth, 70 * FitHeight)];
        _shortcontentLabel.numberOfLines = 0;
        [_shortcontentLabel NightWithType:UIViewColorTypeNormal];
        [self.contentView addSubview:_shortcontentLabel];

        
    }
    return self;
}

-(void)setFreeWriteModel:(HQHFreeWriteModel *)freeWriteModel
{
    if (_freeWriteModel != freeWriteModel) {
        _freeWriteModel = freeWriteModel;
        
        _titleLabel.text = freeWriteModel.title;
        _shortcontentLabel.text = freeWriteModel.shortcontent;
        NSLog(@"%@", freeWriteModel.title);
    }
}












/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
